package com.higold.cloud.mvp.model

import com.higold.cloud.mvp.model.bean.achievedetailbean.AchieveDetail
import com.higold.cloud.net.RetrofitManager
import com.higold.cloud.rx.scheduler.SchedulerUtils
import io.reactivex.Observable

/**
 *    author : lxz
 *    date   : 2019/8/30 17:08
 *    desc   :
 */
class AchieveDetailModel {

    /**
     * 代理商任务达成情况  type: 0 当月，1累计
     */
    fun requestAchieveDetail(user_code: String): Observable<AchieveDetail> {

        return RetrofitManager.service.getAchieveDetail(user_code)
                .compose(SchedulerUtils.ioToMain())
    }
}